/// File:		Timer.h
/// Author:		Dennis Norton
/// Date:		05/11/12
/// Purpose:	This class is an individual timer class that an object can use for whatever purpose.

#ifndef TIMER_H_
#define TIMER_H_

class Timer
{
	unsigned long _PrevTime;
	unsigned int _Frames, _FPS;
	float _FPSTimer;
	float _CurrentTime;
	float _ElapsedTime;
	bool _Updating;
	bool _bCountDown;
	bool _bDoneCounting;
public:
	Timer();
	~Timer();

	/// Function:	StartTimer
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This tells the timer to start updating from it's current time.
	void StartTimer();
	/// Function:	ResumeTimer
	/// Author:		Wade Shwallon
	/// Date:		06/12/12
	/// Purpose:		This tells the timer to start updating from it's current time.
	void ResumeTimer();
	/// Function:	StartTimer
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This tells the timer to start counting down from the amount of seconds passed in.
	void StartTimer(float SecsToCountDown);

	/// Function:	StopTimer
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This tells the timer to stop updating from it's current time.
	void StopTimer();

	/// Function:	ResetTimer
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This tells the timer to set it's time to 0.
	void ResetTimer();

	/// Function:	Update
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This updates the timer.
	void Update();

	/// Function:	GetElapsedTime
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This returns the amount of time that has elapsed since the last update.
	inline const float& GetElapsedTime() {return _ElapsedTime;}

	/// Function:	GetFPS
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This returns the current FPS.
	inline unsigned int GetFPS() {return _FPS;}

	/// Function:	GetTotalTime
	/// Author:		Dennis Norton
	/// Date:		05/11/12
	/// Purpose:		This returns the total time since the timer has been started.
	inline const float& GetTotalTime() { return _CurrentTime;}

	inline bool IsTimerDone() {return _bDoneCounting;}
};

#endif